// vite.config.js
import {resolve} from 'path';
import {defineConfig} from 'vite';
import shader from "rollup-plugin-shader";

export default defineConfig({
    plugins: [
        shader({
            include: "**/*.+(frag|vert)", // 打包哪些后缀名的文件
        }),
    ],
    server: {
        host: "0.0.0.0",
        https: false,
    },
    base: "./",
    build: {
        rollupOptions: {
            input: {
                main: resolve(__dirname, 'index.html'),
                example1: resolve(__dirname, 'demo/example1/index.html'),
                example2: resolve(__dirname, 'demo/example2/index.html'),
                example3: resolve(__dirname, 'demo/example3/index.html'),
            },
        },
    },
});




